# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=multitun
pkgver=1.319a134
pkgrel=4
epoch=1
groups=('blackarch' 'blackarch-tunnel')
pkgdesc='Tunnel arbitrary traffic through an innocuous WebSocket.'
arch=('any')
url='https://github.com/covertcodes/multitun'
license=('GPL3')
depends=('python2' 'python2-twistedx' 'python2-iniparse' 'python2-autobahn'
         'python2-python-pytun' 'python2-pycryptodome' 'python2-dpkt'
         'python2-cryptography' 'python2-streql' 'python2-typing')
makedepends=('git')
source=("git+https://github.com/BlackArch/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 $pkgname "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 "$pkgname.conf" "$pkgdir/etc/$pkgname.conf"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

